package com.cg.design.graphicdesignpattern.template;

import org.junit.Test;

/**
 * 测试类
 *
 * @program: LeetCode->TemplateTest
 * @description: 测试类
 * @author: cg
 * @create: 2022-03-18 21:23
 **/
public class TemplateTest {

    @Test
    public void testTemplate() {
        AbstractDisplay d1 = new CharDisplay('H');
        AbstractDisplay d2 = new StringDisplay("Hello, world.");
        AbstractDisplay d3 = new StringDisplay("你好，世界。");
        // 实际的程序行为取决于子类的实现
        d1.display();
        d2.display();
        d3.display();
    }


}
